Data management tasks in object-oriented programming are typically implemented by manipulating objects, which are typically non-scalar values. Consider the example of an address book entry, which represents a single person along with zero or more phone numbers and zero or more addresses. This could be modeled in an object-oriented implementation by a “person object” with “slots” to hold the data that comprise the entry: the person's name, a list (or array) of phone numbers, and a list of addresses. The list of phone numbers would itself contain “phone number objects” and so on. The address book entry is treated as a single value by the programming language (it can be referenced by a single variable, for instance). Various methods can be associated with the object, such as a method to return the preferred phone number, the home address, and so on.
Many popular database products, however, such as SQL DBMS products, can only store and manipulate scalar values such as integers and strings, organized within tables. A programmer must either convert the object values into groups of simpler values for storage in the database (and convert them back upon retrieval), or only use simple scalar values within the program. Object-relational mapping is used to implement the first approach.
Object-relational mapping (aka O/RM, ORM, and O/R mapping) is a programming technique for converting data between incompatible type systems in databases and object-oriented programming languages. This creates, in effect, a “virtual object database” which can be used from within the programming language.
Typically, an ORM system provides an application programming interface (API) to access a cache which may be implemented locally or in a cluster manner. Typically, when a data entry is accessed, the content of the data entry is replicated in a local cache and an invalidation message is sent to other caches in the cluster. Although certain data accesses may not require invalidating other caches, such an invalidation message is still sent which causes certain unnecessary communication traffic.